<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<script>
function fun_popup_process(){
	$(".js_popup_process")
	.modal({
   		backdrop:'static'
	})
		.modal('show');
}
function fun_popup_process_receive(){
	var data = $(this).outputData();
	var mainMessage = data.mainMessage;
	var mainTotalSize = data.mainTotalSize;
	var mainCurrentSize = data.mainCurrentSize;
	var mainPercent = data.mainPercent;
	var isLast = data.last;
	//
	var subMessage = data.subMessage;
	var subTotalSize = data.subTotalSize;
	var subCurrentSize = data.subCurrentSize;
	var subPercent = data.subPercent;
	//
	$(".js_popup_process")
			.find(".js_popup_process_mainTotalSize").text(mainTotalSize)
		.end()
			.find(".js_popup_process_mainCurrentSize").text(mainCurrentSize)
		.end()
			.find(".js_popup_process_mainPercent").text(mainPercent)
		.end()
			.find(".js_popup_process_mainPercent_bar").css("width", mainPercent+"%")
		.end()
			.find(".js_popup_process_mainMessage").text(mainMessage)
		.end()
			.find(".js_popup_process_mainPercent_progress").addClass("active")
		.end()
			.find(".js_popup_process_subMessage").text(subMessage)
		.end()
			.find(".js_popup_process_subPercent").text(subPercent)
		.end()
			.find(".js_popup_process_subPercent_progress").addClass("active")
		.end()
			.find(".js_popup_process_subPercent_bar").css("width", subPercent+"%")
		.end()
			.find(".js_popup_process_closeButton").prop("disabled",true);
	//
	if(isLast){
		$(".js_popup_process")
				.find(".js_popup_process_mainPercent_progress").removeClass("active")
			.end()
				.find(".js_popup_process_subPercent_progress").removeClass("active")
			.end()
				.find(".js_popup_process_closeButton").prop("disabled",false);
	}
}
</script>
<!-- S 进度弹出框 -->
<div class="modal fade js_popup_process">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header" >
        <h4 class="modal-title">数据处理</h4>
      </div>
      <div class="modal-body">
       	<!-- 进度条 -->
       	<div><span class="js_popup_process_mainMessage"></span></div>
       	<div class="progress progress-striped active js_popup_process_mainPercent_progress" style="background-color: #aaaaaa;" >
		    <div class="progress-bar progress-bar-success js_popup_process_mainPercent_bar" role="progressbar"
		         aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;text-align: center;">
		        <span style="position:absolute;" >已完成(<span class="js_popup_process_mainPercent"></span>%)</span>
		    </div>
		</div>
		<div><span class="js_popup_process_subMessage"></span></div>
		<div class="progress progress-striped active js_popup_process_subPercent_progress" style="background-color: #aaaaaa;" >
		    <div class="progress-bar progress-bar-warning js_popup_process_subPercent_bar" role="progressbar"
		         aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;text-align: center;">
		        <span style="position:absolute;" >已完成(<span class="js_popup_process_subPercent"></span>%)</span>
		    </div>
		</div>
       	<!-- 进度条 -->
       	<div>
       		共需处理<span class="js_popup_process_mainTotalSize"></span>个进程，
      		当前正在处理第<span class="js_popup_process_mainCurrentSize"></span>个进度程，
      	</div>
      </div>
      <div class="modal-footer">
      		<button type="button" class="btn btn-default js_popup_process_closeButton" disabled="disabled" data-dismiss="modal">关闭</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- E 进度弹出框 -->